package com.travel.travelServer.entity1;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.travel.travelServer.entity1.vo.CommentVo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Landscapes {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    private String name;

    private String image;

    private String place;

    private String remark;

    private Integer level;

    private Float rate;

    private String createBy;

    private Date createTime;

    private String updateBy;

    private Date updateTime;

    @TableField(exist = false)
    private Boolean isCollected;

    @TableField(exist = false)
    private List<CommentVo> commentVos;

    @TableField(exist = false)
    private List<Comment> comments;
}
